@ERASE

@INIT 9
9 Z = 1
10 H = 0
11 A = pioout 10
12 A = pioout 9
13 A = pioclr 10
14 A = pioset 9
15 RETURN

@IDLE 20
20 IF H = 0 THEN 30
21 IF H = 1 THEN 40
22 IF H = 2 THEN 50
23 IF H = 3 THEN 60
24 IF H = 4 THEN 30
29 RETURN

30 A = slave 8
31 H = 1
32 RETURN

40 PRINTU"CASE 1\n\r
41 PRINTU"PAIR NOW\n\r THEN 
42 PRINTU"INPUT SOMETHING
43 UART 1
44 PRINTU $0
45 H = 2
46 A = slave 8
47 RETURN

50 PRINTU"CASE 2\n\r
51 PRINTU"PAIR NOW\n\r
52 H = 3
53 A = slave 8
54 RETURN

60 PRINTU"CASE 3\n\r
61 PRINTU"PAIR NOW\n\r
62 PRINTU"INPUT SOMETHING\n\r
63 UART 1
64 PRINTU $0
65 H = 4
66 A = slave 8
67 RETURN

@PIN_CODE 100
100 IF H > 2 THEN 105
101 $0="1234"
102 RETURN

105 PRINTU"PIN: "
106 UART 4
107 RETURN

@SLAVE 200
200 A = shell
201 RETURN
